# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Errors_ErrorCode do
  @moduledoc """
  The error reason represented by type and enum.

  ## Attributes

  *   `authenticationError` (*type:* `String.t`, *default:* `nil`) - Indicates failure to properly authenticate user.
  *   `authorizationError` (*type:* `String.t`, *default:* `nil`) - An error encountered when trying to authorize a user.
  *   `customColumnError` (*type:* `String.t`, *default:* `nil`) - The reasons for the custom column error
  *   `dateError` (*type:* `String.t`, *default:* `nil`) - The reasons for the date error
  *   `dateRangeError` (*type:* `String.t`, *default:* `nil`) - The reasons for the date range error
  *   `distinctError` (*type:* `String.t`, *default:* `nil`) - The reasons for the distinct error
  *   `headerError` (*type:* `String.t`, *default:* `nil`) - The reasons for the header error.
  *   `internalError` (*type:* `String.t`, *default:* `nil`) - An unexpected server-side error.
  *   `invalidParameterError` (*type:* `String.t`, *default:* `nil`) - The reasons for invalid parameter errors.
  *   `queryError` (*type:* `String.t`, *default:* `nil`) - An error with the query
  *   `quotaError` (*type:* `String.t`, *default:* `nil`) - An error with the amount of quota remaining.
  *   `requestError` (*type:* `String.t`, *default:* `nil`) - An error caused by the request
  *   `sizeLimitError` (*type:* `String.t`, *default:* `nil`) - The reasons for the size limit error
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :authenticationError => String.t() | nil,
          :authorizationError => String.t() | nil,
          :customColumnError => String.t() | nil,
          :dateError => String.t() | nil,
          :dateRangeError => String.t() | nil,
          :distinctError => String.t() | nil,
          :headerError => String.t() | nil,
          :internalError => String.t() | nil,
          :invalidParameterError => String.t() | nil,
          :queryError => String.t() | nil,
          :quotaError => String.t() | nil,
          :requestError => String.t() | nil,
          :sizeLimitError => String.t() | nil
        }

  field(:authenticationError)
  field(:authorizationError)
  field(:customColumnError)
  field(:dateError)
  field(:dateRangeError)
  field(:distinctError)
  field(:headerError)
  field(:internalError)
  field(:invalidParameterError)
  field(:queryError)
  field(:quotaError)
  field(:requestError)
  field(:sizeLimitError)
end

defimpl Poison.Decoder,
  for: GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Errors_ErrorCode do
  def decode(value, options) do
    GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Errors_ErrorCode.decode(value, options)
  end
end

defimpl Poison.Encoder,
  for: GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Errors_ErrorCode do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
